﻿using MvcEnumDropDownList.Helpers;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using DataAnnotationsExtensions;
using System;

namespace BenzInfo.Hockey.Grenadiers.Models
{
    [Table("NewsFile")]
    public class NewsFile
    {
        [Key]
        public int Id { get; set; }

        [Required]
        [StringLength(100, MinimumLength = 2)]
        [Display(Name = "DisplayTitleEN", ResourceType = typeof(Resources.Models.NewsFile))]
        public string TitleEN { get; set; }

        [Required]
        [StringLength(100, MinimumLength = 2)]
        [Display(Name = "DisplayTitleFR", ResourceType = typeof(Resources.Models.NewsFile))]
        public string TitleFR { get; set; }

        [Required]
        [FileExtensions("pdf")]
        [Display(Name = "DisplayNewsFile", ResourceType = typeof(Resources.Models.NewsFile))]
        public string FileName { get; set; }

        [Required]
        [Display(Name = "DisplayNewsYear", ResourceType = typeof(Resources.Models.NewsFile))]
        public string Year { get; set; }

        [Required]
        public DateTime PublicationDate { get; set; }
    }
}